using UnityEngine;

namespace FrameWork
{
    public class AudioHelper : MonoBehaviour, IAudioHelper
    {
        [SerializeField]
        private AudioSource _audioSource;

        private void Start()
        {
            AudioModule audioModule = ModuleGetter.AudioModule;
            audioModule.RegisterHelper(this);

            if (_audioSource == null)
                _audioSource = GetComponent<AudioSource>();
        }

        public void PlayBGM(string bgmName, float volume, float delay)
        {

        }

        public void PlaySound(AudioClip clip, float volume, float delay)
        {
            _audioSource.PlayOneShot(clip, volume);
        }
    }
}

